<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style/global.css" />
<link rel="stylesheet" type="text/css" href="style/admin.css" />
<script src="js/xheditor/jquery/jquery-1.4.4.min.js"></script>
<title>题目选项管理</title>
</head>
<?php //var_dump($opt);?>
<body>
	<div id="wrap">
    	<div id="public_head"></div>
        <div class="m_search">正在修改题目是：<font style='color: green;'><?php echo $quest['TITLE'];?></font>
							<input class="btn_add" name="" type="button" value=""
								onclick="location.href='/index.php?c=questmanage&a=add&id=<?php echo $qid;?>'" />&nbsp;&nbsp;&nbsp;
								<span style='font-size: 16px; color: red; cursor: pointer;' onclick="location.href=T.getCookie('goback_quest');T.delCookie('goback_quest')">返回</span>
        </div>
        <div class="m_content">
        	<table class="qi_table" width="0" border="0" cellpadding="0" cellspacing="1">
              <tr><th >ID</th><th>排序</th><th >选项名称</th><th>允许自定义输入</th><th>选项值</th><th>操作</th></tr>
              <?php 
              	if(is_array($opt) && count($opt)>0){
              		$i = 1;
              		foreach ($opt as $v){
              ?>
              <tr><td><?php echo $i++;?></td><td><?php echo $v['SORT_NO']?></td><td style="text-align:left;"><?php echo $v['OPT_NAME']?></td><td><?php if(1==$v['ALLOW_INPUT']){echo '是';}else{echo '否';}?></td><td><?php echo $v['OPT_VALUE']?></td><td><a href="/index.php?c=questmanage&a=edit&id=<?php echo $qid;?>&pid=<?php echo $v['OPT_ID'];?>">修改</a>&nbsp;&nbsp;<a onclick='return delmod();' href="/index.php?c=questmanage&a=del&id=<?php echo $v['OPT_ID'];?>">删除</a></td></tr>
              <?php 
              		}
              	}else{
              ?>
              <tr height='50px'><td colspan='10' style="font-size:16px;color:green;">此题暂时还没有选项，请添加！</td></tr>
              <?php 
              	}
              ?>
            </table>
        </div>
    </div>
<script>
function delmod(){
	if(confirm('确定要删除该分类吗？')){
		return true;
	}else{
		return false;
	}
}
</script>
</body>
</html>
<script src="/js/boot.js"></script>
<script src="/js/tip.js"></script>
<script src="/js/add_public_head.js" type="text/javascript"></script>